import java.util.Scanner;

public class palindromicNumber {
    public static boolean isPalindromic(int n) {
        int temp = n;
        int rev = 0;
        while (temp != 0) {
            int rem = temp % 10;
            rev = rev * 10 + rem;
            temp = temp / 10;
        }
        return n == rev;
    }

    public static void main(String[] args) {
        int n;
        System.out.println("请输入一个数字：");
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        if (isPalindromic(n)) {
            System.out.println(n + " 是回文数");
        } else {
            System.out.println(n + " 不是回文数");
        }
    }
}
